﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
namespace PTTK11_HuongRung
{
    public partial class frmMonAn : Form
    {
        public frmMonAn()
        {
            InitializeComponent();
        }

       

        private void frmMonAn_Load(object sender, EventArgs e)
        {
            reLoad();
        }

        private void reLoad()
        {
            MonAnBUS bus = new MonAnBUS();
            dgvDanhSach.DataSource = bus.GetDSMonAn();
        }

        private void btnTimKiem_Click(object sender, EventArgs e)
        {
            MonAnBUS bus = new MonAnBUS();
            dgvDanhSach.DataSource = bus.TimKiem(txtTuKhoa.Text.Trim());
        }

  

        private void dgvDanhSach_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            
        }

        private void btnThem_Click(object sender, EventArgs e)
        {
            frmThemMonAn frm = new frmThemMonAn();
            frm.ShowDialog();
        }
    }
}
